﻿using System;
using Adf.Core.Db;
using Adf.Core.Entity;
using CYQ.Data.Table;
using Test.Interface;

namespace Test.Implement
{
    public class OrgImpl:IOrg
    {

        private const String CurrentTableName = "adf_org";
        private const String VCurrentTableName = "adf_org";


        /// <summary>
        /// 初始化值
        /// 袁赛
        /// 2020-5-22
        /// </summary>
        /// <returns></returns>
        public MDataRow InitDataRow()
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 获得实体
        /// 袁赛
        /// </summary>
        /// <param name="sOrgCode">通知编号</param>
        /// <param name="bCache">是否启用缓存</param>
        /// <returns></returns>
        public MDataRow GetEntityWithOrgCode(string sOrgCode, bool bCache = false)
        {
            String sWhere = "1=1 and orgcode = '"+sOrgCode+"'";
            return DbService.GetOne(CurrentTableName, sWhere);
        }

        /// <summary>
        /// 增加数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// 
        /// <returns></returns>
        public ExeMsgInfo Add(MDataRow dataRow)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 更新数据
        /// 袁赛
        /// </summary>
        /// <param name="dataRow"></param>
        /// <returns></returns>
        public ExeMsgInfo Update(MDataRow dataRow)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 删除数据
        /// 袁赛
        /// </summary>
        /// <param name="sOrgCode">通知编号</param>
        /// <returns></returns>
        public ExeMsgInfo DeleteByOrgCode(string sOrgCode)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        ///获得列表
        /// 袁赛
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="orderBy">排序</param>
        /// <param name="recordCount">总数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns></returns>
        public MDataTable GetList(int pageIndex, int pageSize, string orderBy, ref int recordCount, ref int pageCount)
        {
            throw new System.NotImplementedException();
        }
    }
}